package de.backtomedieval.research;

import de.backtomedieval.R;
import de.backtomedieval.main.Game;
import de.backtomedieval.units.Halberdier;
import de.backtomedieval.units.Hoplit;
import de.backtomedieval.units.Spearman;

public class Improved_Thrust_Weapons extends AbstractResearch {

	private static int baseResearchPoints = 900;
	
	
	public Improved_Thrust_Weapons() {
		this.setBaseResearchPoints(baseResearchPoints);
	}
	
	@Override
	public String getName() {
		return Game.getString(R.string.research_improved_thrust_weapons);
	}
	
	protected void onLevelUp(Technology technology) {
		technology.setHalberdierAttackBonus(calculateNewTechnologyPoints(Halberdier.getBaseAttack(), technology.getHalberdierAttackBonus(),getLevel(),10));
		technology.setHoplitAttackBonus(calculateNewTechnologyPoints(Hoplit.getBaseAttack(), technology.getHoplitAttackBonus(),getLevel(),10));
		technology.setSpearmanAttackBonus(calculateNewTechnologyPoints(Spearman.getBaseAttack(), technology.getSpearmanAttackBonus(),getLevel(),10));
	}

	@Override
	public String getResearchInfo(int level) {
		String info="";
		info += Game.getString(R.string.unit_halberdier) + ": " + Game.getString(R.string.attack) + " +" + calculateTechnologyPointsOfLevel(Halberdier.getBaseAttack(), level,10) +"<br>";
		info += Game.getString(R.string.unit_hoplit) + ": " + Game.getString(R.string.attack) + " +" + calculateTechnologyPointsOfLevel(Hoplit.getBaseAttack(),level,10)+"<br>";
		info += Game.getString(R.string.unit_spearman) + ": " + Game.getString(R.string.attack) + " +" + calculateTechnologyPointsOfLevel(Spearman.getBaseAttack(),level,10);
		return info;
	}

}
